<!--
 * @Descripttion: icon图标组件
 * @version: 
 * @Author: hutao
 * @Date: 2022-01-17 10:07:34
 * @LastEditors: hutao
 * @LastEditTime: 2023-05-25 09:39:35
-->
<template>
  <el-tooltip :content="title"
              :disabled="!title">
    <svg class="icon"
         @click="$emit('click')"
         :title="title"
         aria-hidden="true">
      <use :title="title"
           :xlink:href="`#icon-${icon}`"></use>
    </svg>
  </el-tooltip>
</template>
<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
@Component
export default class Index extends Vue {
  @Prop() icon!: string;
  @Prop() title!: string;
}
</script>
<style lang="scss" scoped></style>
